#pragma once
#include "TEX0_CallPage.h"
#include "TEX0_StatusPage.h"
#include "TEX0_ConferencePage.h"
#include "TEX0_IncomingCall.h"
#include "TEX0_CheckConfCtrlPWD.h"
#include "TEX0_SDK.h"


extern char* g_circuitType[12];

// CTEX0_Sheet


class CTEX0_Sheet : public CPropertySheet
{
	DECLARE_DYNAMIC(CTEX0_Sheet)

public:
	CTEX0_Sheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
	CTEX0_Sheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
	virtual ~CTEX0_Sheet();

protected:
	DECLARE_MESSAGE_MAP()

private:
	CTEX0_CallPage m_callPage;
	CTEX0_StatusPage m_statusPage;
	CTEX0_ConferencePage m_conferencePage;
	CTEX0_CheckConfCtrlPWD m_checkConfCtrlPWD;
	CTEX0_IncomingCall* m_incomingCall;
	bool m_run;
	HANDLE m_thread;
	unsigned int m_threadID;
	int m_confType;

public:
	virtual BOOL OnInitDialog();
	afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);
	void ShowTitleMsg(CString msg) {SetWindowText(msg);}
	void MainLoop();
	void StartMsgRetrieval();
	void StopMsgRetrieval();
	void OpenAddressBook(vector<SiteAddrRecord> &callRecords);
};


